﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using NosoiFigthersWeb.db;

namespace NosoiFigthersWeb
{
    public partial class GetImage : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            DataBaseClassesDataContext db = new DataBaseClassesDataContext();
            var img = (from i in db.Images where i.id == int.Parse(Request["id"]) select i).Single();
            Response.ContentType = "image/jpeg";
            Response.BinaryWrite(img.data.ToArray());
        }
    }
}
